import request from '@/utils/request'

// 获取用户详细信息
export function getInfo() {
  return request({
    url: '/user/getUserInfo',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'get'
  })
}

export function listUsers(data) {
  return request({
    url: '/user/index',
    method: 'post',
	data:data
  })
}

export function addUsers(data) {
  return request({
    url: '/user/add',
    method: 'post',
	data:data
  })
}

export function editUsers(data) {
  return request({
    url: '/user/edit',
    method: 'post',
	data:data
  })
}

//查询用户的角色
export function findUserRole(id) {
  return request({
    url: '/user/findUserRole/id/'+id,
    method: 'get',
	
  })
}
export function delUsers(id) {
  return request({
    url: '/user/del/id/'+id,
    method: 'get',
	
  })
}

export function batchRemove(data) {
  return request({
    url: '/user/batchRemove',
    method: 'post',
	data:data
  })
}